package com.example;

import com.gupaoedu.book.rocketmq.consumer.InputChannel;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

@EnableBinding({ Sink.class, InputChannel.class})
@SpringBootApplication
public class SpringCloudRocketmqConsumerApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringCloudRocketmqConsumerApplication.class, args);
	}

	@StreamListener(value = InputChannel.ORDER_INPUT)
	public void receive(String receiveMsg) {
		System.out.println("receive: " + receiveMsg);
	}

}
